#include "Scene_game.h"

Scene_game::Scene_game(void)
{
}

Scene_game::~Scene_game(void)
{
}

bool Scene_game::init()
{
	bool bRet = false;

	do
	{
		CCScene::init();


		CCLayerColor* pLayer = CCLayerColor::layerWithColor( ccc4(100,255,255,255) );
		pLayer->setAnchorPoint(CCPointZero);
		pLayer->setPosition(CCPointZero);
		addChild(pLayer);
		

		pStage = CStage::node();
		pStage->setAnchorPoint(CCPointZero);
		pStage->setPosition(CCPointZero);
		addChild(pStage);

		CCMenuItemImage* pPause_Btn = CCMenuItemImage::itemFromNormalImage("image/button/pause_btn.png","image/button/pause_btn.png", this, menu_selector(Scene_game::pause_game) );
		pPause_Btn->setAnchorPoint(CCPointZero);
		pPause_Btn->setPosition(ccp(272,0));

		CCMenu* pMenu = CCMenu::menuWithItems(pPause_Btn, NULL);
		pMenu->setAnchorPoint(CCPointZero);
		pMenu->setPosition(CCPointZero);
		addChild(pMenu);

		bRet = true;
	}
	while(0);

	return bRet;
}

void Scene_game::pause_game(CCObject* pSender)
{
	pStage->m_pOutletMgr->ShuffleOutlet();
}